﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MvcEngine.Mvc.Filters;
using MvcEngine.Blog.Managers;

namespace MvcEngine.Blog.Filters
{
    public class BlogCaptchaFilter : CaptchaFilter
    {
        public override void OnActionExecuting(System.Web.Mvc.ActionExecutingContext filterContext)
        {
            var blog = BlogManager.Current.GetCurrentBlog();
            if (blog.ShowCaptcha)
                base.OnActionExecuting(filterContext);
        }
    }
}
